#bm7
#N.Sarmiento
#coding: utf-8
import b7a
import os
import random
from time import sleep
os.system('clear')
playerName = input("Please enter your name: ")
for i in range(5):
print(".")
sleep(0.3)
b7a.greet(playerName)
b7a.play(playerName)
-----------------------------------------------------------------------------------
#b7a
#N.Sarmiento
#coding: utf-8
import os
import random
from time import sleep
def greet(word):
print("Hello " + word + " and welcome to my mini-game called 'Twist' ")
sleep(1)
print("On this game you will gonna re-arrange letters and figure out the word")
print("please wait a minute")
sleep(1)
toRearrange = "blank"
correct = True
rand = random.randint(1,3)
if rand == 1:
toRearrange = "「 N G G E R I 」"
if rand == 2:
toRearrange = "「 H T I L E R」"
if rand == 3:
toRearrange = "「 O C U S F 」"
def play(name):
print("Your word to re-arrange is " + toRearrange)
print(" *Note that the answer should be written in UPPERCASE and NO Space* ")
while(correct):
ans = input("Your answer is: ")
tries = 1
if ans == "GINGER" or ans == "LITHER" or ans == "FOCUS":
print("You got it right " + name + "!")
print("It took you " , tries , " times")
if tries == 1:
print("Such luck!! Congrats " + name )
elif tries < 5 and tries != 1:
print("That was quick! Great job " + name)
elif tries >= 5 and tries <= 10:
print("You're doing good. Keep it up " + name)
elif tries > 10:
print("WOW ",tries,"times... You have alot of work you do "+ name )
print("Go study in your room")
break
else:
print("Nice try " + name + ", but that's not it. Please try again \n" )
# + for string , for integer
tries += 1